#ifndef RFID_DETECT_H_
#define RFID_DETECT_H_

#include "mqtt_client.h"
#include "driver/uart.h"

typedef struct {
    struct {
        uart_port_t port;
        uint32_t tx_pin;
        uint32_t rx_pin;
        uint32_t baud_rate;
    } uart;
    const char *mqtt_broker_uri;
    uint8_t in_addr;
    uint8_t out_addr;
}rfid_config_t;

typedef void * rfid_handle_t;

rfid_handle_t rfid_init(const rfid_config_t *config);

void rfid_poll(esp_mqtt_client_handle_t client);

#endif /* RFID_DETECT_H_ */
